<?php
namespace Admin\Controller;
use Think\Controller;
class ShopController extends CommonController
{
	public function __construct()
	{
		parent::__construct();
		$this->model = M('shop');
	}
	/**
	 * 店铺列表
	 * @return [type] [description]
	 */
	public function index()
	{
		$this->display();
	}

	/**
	 * 店铺添加
	 */
	public function add()
	{
		$this->display();
	}


	/**
	 * 店铺分类,直营门店，普通门店
	 * @return [type] [description]
	 */
	public function common()
	{
		$this->display();
	}

	/**
	 * 直营门店
	 * @return [type] [description]
	 */
	public function direct()
	{
		$this->display();
	}


	/**
	 * 修改店铺信息
	 * @return [type] [description]
	 */
	public function update()
	{
		$this->display();
	}

	/**
	 * 删除店铺
	 * @return [type] [description]
	 */
	public function delete()
	{
		$id = I('post.id');

		$res = $this->model->delete($id);

		if ($res) {
			success([
				'id' => $id,
			]);
		}else{
			error(1001,'删除失败');
		}
	}
}